package com.zenithmind.classroom.pojo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 课时详情VO
 * 
 * @author ZenithMind Team
 * @since 2025-01-09
 */
@Data
@Schema(description = "课时详情VO")
public class LessonDetailVO {

    /**
     * 课时ID
     */
    @Schema(description = "课时ID", example = "1234567890")
    private String id;

    /**
     * 课程ID
     */
    @Schema(description = "课程ID", example = "1234567890")
    private String courseId;

    /**
     * 课程标题
     */
    @Schema(description = "课程标题", example = "Java从入门到精通")
    private String courseTitle;

    /**
     * 章节ID
     */
    @Schema(description = "章节ID", example = "1234567890")
    private String chapterId;

    /**
     * 章节标题
     */
    @Schema(description = "章节标题", example = "第一章：Java基础")
    private String chapterTitle;

    /**
     * 课时标题
     */
    @Schema(description = "课时标题", example = "1.1 Java环境搭建")
    private String title;

    /**
     * 课时描述
     */
    @Schema(description = "课时描述", example = "学习如何搭建Java开发环境")
    private String description;

    /**
     * 课时编号
     */
    @Schema(description = "课时编号", example = "1")
    private Integer lessonNumber;

    /**
     * 课时类型（1:视频, 2:音频, 3:文档, 4:图文, 5:直播, 6:作业, 7:测验）
     */
    @Schema(description = "课时类型（1:视频, 2:音频, 3:文档, 4:图文, 5:直播, 6:作业, 7:测验）", example = "1")
    private Integer type;

    /**
     * 类型名称
     */
    @Schema(description = "类型名称", example = "视频")
    private String typeName;

    /**
     * 内容URL
     */
    @Schema(description = "内容URL", example = "https://example.com/video.mp4")
    private String contentUrl;

    /**
     * 视频时长（秒）
     */
    @Schema(description = "视频时长（秒）", example = "1800")
    private Integer duration;

    /**
     * 时长格式化
     */
    @Schema(description = "时长格式化", example = "30:00")
    private String durationFormatted;

    /**
     * 文件大小（字节）
     */
    @Schema(description = "文件大小（字节）", example = "104857600")
    private Long fileSize;

    /**
     * 文件大小格式化
     */
    @Schema(description = "文件大小格式化", example = "100MB")
    private String fileSizeFormatted;

    /**
     * 文件格式
     */
    @Schema(description = "文件格式", example = "mp4")
    private String fileFormat;

    /**
     * 课时内容（富文本）
     */
    @Schema(description = "课时内容（富文本）")
    private String content;

    /**
     * 学习目标
     */
    @Schema(description = "学习目标")
    private String objectives;

    /**
     * 重点难点
     */
    @Schema(description = "重点难点")
    private String keyPoints;

    /**
     * 是否免费（0-否，1-是）
     */
    @Schema(description = "是否免费（0-否，1-是）", example = "1")
    private Integer isFree;

    /**
     * 是否试看（0-否，1-是）
     */
    @Schema(description = "是否试看（0-否，1-是）", example = "1")
    private Integer isPreview;

    /**
     * 是否发布（0-否，1-是）
     */
    @Schema(description = "是否发布（0-否，1-是）", example = "1")
    private Integer isPublished;

    /**
     * 观看次数
     */
    @Schema(description = "观看次数", example = "5000")
    private Long viewCount;

    /**
     * 完成人数
     */
    @Schema(description = "完成人数", example = "800")
    private Long completedCount;

    /**
     * 完成率
     */
    @Schema(description = "完成率", example = "80.0")
    private Double completionRate;

    /**
     * 平均观看时长（秒）
     */
    @Schema(description = "平均观看时长（秒）", example = "1500")
    private Integer avgWatchTime;

    /**
     * 平均评分
     */
    @Schema(description = "平均评分", example = "4.5")
    private Double averageRating;

    /**
     * 排序值
     */
    @Schema(description = "排序值", example = "1")
    private Integer sortOrder;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间", example = "2024-01-01 10:00:00")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间", example = "2024-01-01 10:00:00")
    private LocalDateTime updateTime;

    /**
     * 用户学习进度（当前用户）
     */
    @Schema(description = "用户学习进度", example = "50")
    private Integer userProgress;

    /**
     * 用户学习状态（当前用户）
     */
    @Schema(description = "用户学习状态", example = "1")
    private Integer userStatus;

    /**
     * 用户最后观看位置（当前用户）
     */
    @Schema(description = "用户最后观看位置", example = "900")
    private Integer userLastPosition;

    /**
     * 是否已收藏（当前用户）
     */
    @Schema(description = "是否已收藏", example = "true")
    private Boolean isFavorited;

    /**
     * 用户笔记数量（当前用户）
     */
    @Schema(description = "用户笔记数量", example = "3")
    private Integer userNoteCount;

    /**
     * 相关资源
     */
    @Schema(description = "相关资源")
    private String relatedResources;

    /**
     * 作业内容
     */
    @Schema(description = "作业内容")
    private String homework;

    /**
     * 测验内容
     */
    @Schema(description = "测验内容")
    private String quiz;
}
